<script setup>
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useStore } from 'vuex';

const router = useRouter();
const store = useStore();

function toHome() {
  router.push({ path: '/' });
}
</script>

<template>
  <div class="search-wrapper">
    <div class="search-inp">
      <i-ep-Search class="search-iconfont" />
      <el-input
        v-model="input"
        placeholder="搜影片、影院"
        :prefix-icon="Search"
      />
    </div>
    <div class="cancel" @click="toHome">取消</div>
  </div>
  <!-- 影片建议列表 -->
  <div
    class="loding"
    v-loding="loading"
    v-if="loading"
  >
  </div>
  <div
    class="list"

  >
    <div class="item" v-for="m in list" :key="m">
      <div class="img">
        <img :src="item.img" />
      </div>
      <div class="info">
        <div class="name">{{ item.name }}</div>
        <div class="desc">{{ item.desc }}</div>
      </div>
    </div>
  </div>
  <!-- 影院建议列表 -->
  <div
    class="loding"
    v-loding="loading"
    v-if="loading"
  >
  </div>
  <div
    class="list"
    v-else=""
  >
    <div class="item" v-for="c in list" :key="c">
      <div class="img">
        <img :src="item.img" />
      </div>
      <div class="info">
        <div class="name">{{ item.name }}</div>
        <div class="desc">{{ item.desc }}</div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scope>
body {
  background: #fff;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.search-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 14px;
  margin-top: 8px;
  .search-inp {
    display: flex;
    align-items: center;
    width: 300px;
    height: 100%;
    background: #f5f5f5;
    border-radius: 22px;
    .search-iconfont {
      font-size: 18px;
      color: #000;
      margin-left: 10px;
    }
    .el-input {
      height: 0;
    }
  }
  .cancel {
    font-size: 16px;
    color: #dd2727;
  }
}
</style>
